#include "deeptool.h"

DeepTool* DeepTool::_instance=nullptr;

DeepTool* DeepTool::GetInstance(QObject* parent){
    if(DeepTool::_instance==nullptr)
        DeepTool::_instance=new DeepTool(parent);
    return DeepTool::_instance;
};

DeepTool::~DeepTool(){

}

std::function<void()> DeepTool::GetToolFunction(Yzty::DeepToolCode code){
    std::function<void()> tool;

    switch (code) {
        case DeepToolCode::USB:
            tool=[this](){
                this->CheckUsbInfor();
            };
            break;

        case DeepToolCode::FILEDOC:
            tool=[this](){
                this->CheckFileInfor();
            };
            break;

        case DeepToolCode::FILLHISTORY:
            tool=[this](){
                this->CheckFileOperate();
            };
            break;
        case DeepToolCode::HITCUTS:
            tool=[this](){
                this->CheckCutFileInfor();
            };
            break;

        default:
            break;
    }

    return tool;
}

DeepTool::DeepTool(QObject* parent):QObject (parent){

}

QVector<BaceInfor*> DeepTool::DeepTool::CheckUsbInfor(){       //扫描USB设备
    QVector<Yzty::BaceInfor*> res;
    return res;
}

QVector<BaceInfor*> DeepTool::CheckFileInfor(){      //检查文件信息 调用已有接口
    QVector<Yzty::BaceInfor*> res;
    return res;
}

QVector<BaceInfor*> DeepTool::CheckFileOperate(){    //文件操作记录
    QVector<Yzty::BaceInfor*> res;
    return res;
}

QVector<BaceInfor*> DeepTool::CheckCutFileInfor(){   //扫描LINUX 文件碎片
    QVector<Yzty::BaceInfor*> res;
    return res;
}
